package com.youshang520i.dao;


import com.youshang520i.model.StudentModel;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.sql.SQLIntegrityConstraintViolationException;
import java.util.List;

/**
 * @author youshang
 */
@Mapper
public interface StudentDao {

    @Select("select * from stu")
    List<StudentModel> selectStudentList();

    @Insert("insert stu(id ,name) value(#{model.id},#{model.name})")
    int insert(@Param("model") StudentModel studentModel);
}
